import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String str = in.nextLine();
        Map<Character, Integer> map = new HashMap<>();
        char[] chs = str.toCharArray();
        for(char ch : chs){
            int count = map.getOrDefault(ch,0)+1;
            map.put(ch,count);
        }
        for(char ch : chs){
            if(map.get(ch) == 1){
                System.out.println(ch);
                return;
            }
        }
        System.out.println(-1);
    }
}


